import { translate } from './translate';

function isRealNum(val) {
  if (typeof val !== 'number') {
    return false;
  }
  if (!isNaN(val)) {
    return true;
  } else {
    return false;
  }
}

const columnDefine = {
  'population': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('householdNum'),
    dataIndex: 'householdNum',
    key: 'householdNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.householdNum - b.householdNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('registerPop'),
    dataIndex: 'registerPop',
    key: 'registerPop',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.registerPop - b.registerPop,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('malePop'),
    dataIndex: 'malePop',
    key: 'malePop',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.malePop - b.malePop,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('femalePop'),
    dataIndex: 'femalePop',
    key: 'femalePop',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.femalePop - b.femalePop,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('residentPop'),
    dataIndex: 'residentPop',
    key: 'residentPop',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.residentPop - b.residentPop,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('growthRate'),
    dataIndex: 'growthRate',
    key: 'growthRate',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.growthRate - b.growthRate,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('birthRate'),
    dataIndex: 'birthRate',
    key: 'birthRate',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.birthRate - b.birthRate,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('deathRate'),
    dataIndex: 'deathRate',
    key: 'deathRate',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.deathRate - b.deathRate,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'employment': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('employedNum'),
    dataIndex: 'employedNum',
    key: 'employedNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.employedNum - b.employedNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('firstNum'),
    dataIndex: 'firstNum',
    key: 'firstNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.firstNum - b.firstNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('secondNum'),
    dataIndex: 'secondNum',
    key: 'secondNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.secondNum - b.secondNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('thirdNum'),
    dataIndex: 'thirdNum',
    key: 'thirdNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.thirdNum - b.thirdNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'gdp': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalGdp'),
    dataIndex: 'totalGdp',
    key: 'totalGdp',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalGdp - b.totalGdp,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('firstVal'),
    dataIndex: 'firstVal',
    key: 'firstVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.firstVal - b.firstVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('secondVal'),
    dataIndex: 'secondVal',
    key: 'secondVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.secondVal - b.secondVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('thirdVal'),
    dataIndex: 'thirdVal',
    key: 'thirdVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.thirdVal - b.thirdVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('perVal'),
    dataIndex: 'perVal',
    key: 'perVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.perVal - b.perVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'trade': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalTrade'),
    dataIndex: 'totalTrade',
    key: 'totalTrade',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalTrade - b.totalTrade,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('importVal'),
    dataIndex: 'importVal',
    key: 'importVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.importVal - b.importVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('exportVal'),
    dataIndex: 'exportVal',
    key: 'exportVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.exportVal - b.exportVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'assets': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalAssets'),
    dataIndex: 'totalAssets',
    key: 'totalAssets',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalAssets - b.totalAssets,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('firstVal'),
    dataIndex: 'firstVal',
    key: 'firstVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.firstVal - b.firstVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('secondVal'),
    dataIndex: 'secondVal',
    key: 'secondVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.secondVal - b.secondVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('thirdVal'),
    dataIndex: 'thirdVal',
    key: 'thirdVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.thirdVal - b.thirdVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('estateVal'),
    dataIndex: 'estateVal',
    key: 'estateVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.estateVal - b.estateVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('residenceVal'),
    dataIndex: 'residenceVal',
    key: 'residenceVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.residenceVal - b.residenceVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('increaseVal'),
    dataIndex: 'increaseVal',
    key: 'increaseVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.increaseVal - b.increaseVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('sale_area'),
    dataIndex: 'sale_area',
    key: 'sale_area',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.sale_area - b.sale_area,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('saleVal'),
    dataIndex: 'saleVal',
    key: 'saleVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.saleVal - b.saleVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],


  'revenue': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('revenue'),
    dataIndex: 'revenue',
    key: 'revenue',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.revenue - b.revenue,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('budgetaryIn'),
    dataIndex: 'budgetaryIn',
    key: 'budgetaryIn',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.budgetaryIn - b.budgetaryIn,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('budgetaryExp'),
    dataIndex: 'budgetaryExp',
    key: 'budgetaryExp',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.budgetaryExp - b.budgetaryExp,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],


  'life': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('vilDisposableIn'),
    dataIndex: 'vilDisposableIn',
    key: 'vilDisposableIn',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.vilDisposableIn - b.vilDisposableIn,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('vilPerExp'),
    dataIndex: 'vilPerExp',
    key: 'vilPerExp',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.vilPerExp - b.vilPerExp,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('cityDisposableIn'),
    dataIndex: 'cityDisposableIn',
    key: 'cityDisposableIn',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.cityDisposableIn - b.cityDisposableIn,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('cityPerExp'),
    dataIndex: 'cityPerExp',
    key: 'cityPerExp',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.cityPerExp - b.cityPerExp,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('vilLivingArea'),
    dataIndex: 'vilLivingArea',
    key: 'vilLivingArea',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.vilLivingArea - b.vilLivingArea,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('cityLivingArea'),
    dataIndex: 'cityLivingArea',
    key: 'cityLivingArea',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.cityLivingArea - b.cityLivingArea,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('perDepBalance'),
    dataIndex: 'perDepBalance',
    key: 'perDepBalance',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.perDepBalance - b.perDepBalance,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],



  'afaf': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalAfaf'),
    dataIndex: 'totalAfaf',
    key: 'totalAfaf',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalAfaf - b.totalAfaf,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('agrVal'),
    dataIndex: 'agrVal',
    key: 'agrVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.agrVal - b.agrVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('forVal'),
    dataIndex: 'forVal',
    key: 'forVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.forVal - b.forVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('aniVal'),
    dataIndex: 'aniVal',
    key: 'aniVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.aniVal - b.aniVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('fishVal'),
    dataIndex: 'fishVal',
    key: 'fishVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.fishVal - b.fishVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('serviceVal'),
    dataIndex: 'serviceVal',
    key: 'serviceVal',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.serviceVal - b.serviceVal,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'agriculture': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalArea'),
    dataIndex: 'totalArea',
    key: 'totalArea',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalArea - b.totalArea,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('grainArea'),
    dataIndex: 'grainArea',
    key: 'grainArea',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.grainArea - b.grainArea,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('grainOutput'),
    dataIndex: 'grainOutput',
    key: 'grainOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.grainOutput - b.grainOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('rapeseedOutput'),
    dataIndex: 'rapeseedOutput',
    key: 'rapeseedOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.rapeseedOutput - b.rapeseedOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('cottonOutput'),
    dataIndex: 'cottonOutput',
    key: 'cottonOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.cottonOutput - b.cottonOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('fruitsOutput'),
    dataIndex: 'fruitsOutput',
    key: 'fruitsOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.fruitsOutput - b.fruitsOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('teaOutput'),
    dataIndex: 'teaOutput',
    key: 'teaOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.teaOutput - b.teaOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('cocoonsOutput'),
    dataIndex: 'cocoonsOutput',
    key: 'cocoonsOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.cocoonsOutput - b.cocoonsOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('oilseedsOutput'),
    dataIndex: 'oilseedsOutput',
    key: 'oilseedsOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.oilseedsOutput - b.oilseedsOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('meatOutput'),
    dataIndex: 'meatOutput',
    key: 'meatOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.meatOutput - b.meatOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('aquaticOutput'),
    dataIndex: 'aquaticOutput',
    key: 'aquaticOutput',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.aquaticOutput - b.aquaticOutput,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('totalPower'),
    dataIndex: 'totalPower',
    key: 'totalPower',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalPower - b.totalPower,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('elePower'),
    dataIndex: 'elePower',
    key: 'elePower',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.elePower - b.elePower,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('ferUsage'),
    dataIndex: 'ferUsage',
    key: 'ferUsage',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.ferUsage - b.ferUsage,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],


  'industry': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('enterpriseNum'),
    dataIndex: 'enterpriseNum',
    key: 'enterpriseNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.enterpriseNum - b.enterpriseNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('employeeNum'),
    dataIndex: 'employeeNum',
    key: 'employeeNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.employeeNum - b.employeeNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('totalAssets'),
    dataIndex: 'totalAssets',
    key: 'totalAssets',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalAssets - b.totalAssets,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('liquidAssets'),
    dataIndex: 'liquidAssets',
    key: 'liquidAssets',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.liquidAssets - b.liquidAssets,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('fixedAssets'),
    dataIndex: 'fixedAssets',
    key: 'fixedAssets',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.fixedAssets - b.fixedAssets,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('mainIncome'),
    dataIndex: 'mainIncome',
    key: 'mainIncome',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.mainIncome - b.mainIncome,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('totalProfit'),
    dataIndex: 'totalProfit',
    key: 'totalProfit',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalProfit - b.totalProfit,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'pftraffic': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('higiwayPVol'),
    dataIndex: 'higiwayPVol',
    key: 'higiwayPVol',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.higiwayPVol - b.higiwayPVol,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('waterPVol'),
    dataIndex: 'waterPVol',
    key: 'waterPVol',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.waterPVol - b.waterPVol,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('airPVol'),
    dataIndex: 'airPVol',
    key: 'airPVol',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.airPVol - b.airPVol,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('higiwayFVol'),
    dataIndex: 'higiwayFVol',
    key: 'higiwayFVol',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.higiwayFVol - b.higiwayFVol,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('waterFVol'),
    dataIndex: 'waterFVol',
    key: 'waterFVol',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.waterFVol - b.waterFVol,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('airFVol'),
    dataIndex: 'airFVol',
    key: 'airFVol',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.airFVol - b.airFVol,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('highwayMil'),
    dataIndex: 'highwayMil',
    key: 'highwayMil',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.highwayMil - b.highwayMil,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],
  'communication': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('fixedTelNum'),
    dataIndex: 'fixedTelNum',
    key: 'fixedTelNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.fixedTelNum - b.fixedTelNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('mobileTelNum'),
    dataIndex: 'mobileTelNum',
    key: 'mobileTelNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.mobileTelNum - b.mobileTelNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('internetNum'),
    dataIndex: 'internetNum',
    key: 'internetNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.internetNum - b.internetNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'electricity': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('ele'),
    dataIndex: 'ele',
    key: 'ele',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.ele - b.ele,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('industryEle'),
    dataIndex: 'industryEle',
    key: 'industryEle',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.industryEle - b.industryEle,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],



  'finance': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('depositBalance'),
    dataIndex: 'depositBalance',
    key: 'depositBalance',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.depositBalance - b.depositBalance,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('loan_balance'),
    dataIndex: 'loan_balance',
    key: 'loan_balance',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.loan_balance - b.loan_balance,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],



  'patent': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalNum'),
    dataIndex: 'totalNum',
    key: 'totalNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalNum - b.totalNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('inventionNum'),
    dataIndex: 'inventionNum',
    key: 'inventionNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.inventionNum - b.inventionNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('practicalNum'),
    dataIndex: 'practicalNum',
    key: 'practicalNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.practicalNum - b.practicalNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('appearanceNum'),
    dataIndex: 'appearanceNum',
    key: 'appearanceNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.appearanceNum - b.appearanceNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],


  'education': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('highSch'),
    dataIndex: 'highSch',
    key: 'highSch',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.highSch - b.highSch,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('specialSch'),
    dataIndex: 'specialSch',
    key: 'specialSch',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.specialSch - b.specialSch,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('middleSch'),
    dataIndex: 'middleSch',
    key: 'middleSch',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.middleSch - b.middleSch,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('primarySch'),
    dataIndex: 'primarySch',
    key: 'primarySch',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.primarySch - b.primarySch,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('highSchNum'),
    dataIndex: 'highSchNum',
    key: 'highSchNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.highSchNum - b.highSchNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('researchNum'),
    dataIndex: 'researchNum',
    key: 'researchNum',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.researchNum - b.researchNum,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],
  'rdinput': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('totalRd'),
    dataIndex: 'totalRd',
    key: 'totalRd',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.totalRd - b.totalRd,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('aboveState'),
    dataIndex: 'aboveState',
    key: 'aboveState',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.aboveState - b.aboveState,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('largeMedium'),
    dataIndex: 'largeMedium',
    key: 'largeMedium',
    width: 100,
    align: 'right',
    sorter: (a, b) => a.largeMedium - b.largeMedium,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],



  'weather': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('sunshine'),
    dataIndex: 'sunshine',
    key: 'sunshine',
    width: 150,
    align: 'right',
    sorter: (a, b) => a.sunshine - b.sunshine,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('precipitation'),
    dataIndex: 'precipitation',
    key: 'precipitation',
    width: 150,
    align: 'right',
    sorter: (a, b) => a.precipitation - b.precipitation,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],

  'aqi': [{
    title: translate('regionName'),
    dataIndex: 'regionName',
    key: 'regionName',
    width: 100,
    render: (text, record) => { return <span style={{ fontWeight: 600 }}>{text}</span> }
  }, {
    title: translate('aqiValue'),
    dataIndex: 'aqiValue',
    key: 'aqiValue',
    width: 150,
    align: 'right',
    sorter: (a, b) => a.aqiValue - b.aqiValue,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }, {
    title: translate('pm25Value'),
    dataIndex: 'pm25Value',
    key: 'pm25Value',
    width: 150,
    align: 'right',
    sorter: (a, b) => a.pm25Value - b.pm25Value,
    render: (text, record) => { return <span>{isRealNum(text) ? text.toFixed(1) : ''}</span> }
  }],
}

export const getColumns = (type) => { return columnDefine[type] };
